%{
#include "bisonUtils.h"

#include <stdio.h>
extern int yylex();
extern void yyerror(char *s);
%}

%token '.' '=' '(' ')' '"' ',' ';' 
%token <stringVal> KEYWORD   
%token <stringVal> SYMBOL
%token <stringVal> STRINGVALUE

%union {
	char * stringVal;
}
%%
Program:
    | Program Instruction

Instruction: NodeDef { printf("NodeDef"); }
       | NodeAdd { printf("NodeAdd"); }
       | TreeDef { printf("TreeDef"); }

NodeDef: KEYWORD SYMBOL '=' KEYWORD KEYWORD '(' STRINGVALUE ')' ';'

NodeAdd: KEYWORD SYMBOL '=' KEYWORD KEYWORD '(' SYMBOL ')' ';' 

TreeDef: SYMBOL '.' KEYWORD '(' SYMBOL ',' SYMBOL ')' ';'


%%
